import Vue from 'vue'
import Router from 'vue-router'
import home from '@/components/home'
import member from '@/components/member'
import shopcart from '@/components/shopcart'
import search from '@/components/search'
import newInfo from '@/components/news/newInfo'
import newList from '@/components/news/newList'

import imglist from '@/components/imgShare/imglist'
import imgInfo from '@/components/imgShare/imgInfo'

import goodslist from '@/components/goods/goodslist'
import goodsinfo from '@/components/goods/goodsinfo'
import goodsdesc from '@/components/goods/goodsdesc'
import goodscomment from '@/components/goods/goodscomment'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'home',
    component: home
  },
  {
    path: '/home/newList',
    name: 'newList',
    component: newList
  },
  {
    path: '/home/imglist',
    name: 'imglist',
    component: imglist
  },
  {
    path: '/home/goodslist',
    name: 'goodslist',
    component: goodslist
  },
  {
    path: '/home/newInfo/:id',
    name: 'newInfo',
    component: newInfo
  },
  {
    path: '/home/imgInfo/:id',
    name: 'imgInfo',
    component: imgInfo
  },
  {
    path: '/home/goodsinfo/:id',
    name: 'goodsinfo',
    component: goodsinfo
  },
  {
    path: '/home/goodsdesc/:id',
    name: 'goodsdesc',
    component: goodsdesc
  },
  {
    path: '/home/goodscomment/:id',
    name: 'goodscomment',
    component: goodscomment
  },
  {
    path: '/member',
    name: 'member',
    component: member
  },
  {
    path: '/shopcart',
    name: 'shopcart',
    component: shopcart
  },
  {
    path: '/search',
    name: 'search',
    component: search
  }
  ],
  linkActiveClass: 'mui-active'
})
